//package cn.gitalibaba.excel.write;
//
//import com.alibaba.excel.ExcelWriter;
//import com.alibaba.excel.metadata.Sheet;
//import com.alibaba.excel.metadata.Table;
//import com.alibaba.excel.support.ExcelTypeEnum;
//
//import java.io.FileNotFoundException;
//import java.io.FileOutputStream;
//import java.io.IOException;
//import java.io.OutputStream;
//
//public class Excel_Write{
//    public static void main(String[] args){
//
//    }
//
//    public void test2() throws FileNotFoundException {
//        OutputStream out = new FileOutputStream("/Users/jipengfei/77.xlsx");
//        try {
//            ExcelWriter writer = new ExcelWriter(out, ExcelTypeEnum.XLSX,false);
//
//            //写sheet1  数据全是List<String> 无模型映射关系
//            Sheet sheet1 = new Sheet(1, 0);
//            sheet1.setSheetName("第一个sheet");
//            Table table1 = new Table(1);
//            writer.write(getListString(), sheet1, table1);
//            writer.write(getListString(), sheet1, table1);
//
//            //写sheet2  模型上打有表头的注解
//            Table table2 = new Table(2);
//            table2.setTableStyle(getTableStyle1());
//            table2.setClazz(MultiLineHeadExcelModel.class);
//            writer.write(getModeldatas(), sheet1, table2);
//
//            //写sheet3  模型上没有注解，表头数据动态传入,此情况下模型field顺序与excel现实顺序一致
//            List<List<String>> head = new ArrayList<List<String>>();
//            List<String> headCoulumn1 = new ArrayList<String>();
//            List<String> headCoulumn2 = new ArrayList<String>();
//            List<String> headCoulumn3 = new ArrayList<String>();
//            headCoulumn1.add("第一列");
//            headCoulumn2.add("第二列");
//            headCoulumn3.add("第三列");
//            head.add(headCoulumn1);
//            head.add(headCoulumn2);
//            head.add(headCoulumn3);
//            Table table3 = new Table(3);
//            table3.setHead(head);
//            table3.setClazz(NoAnnModel.class);
//            table3.setTableStyle(getTableStyle2());
//            writer.write(getNoAnnModels(), sheet1, table3);
//            writer.write(getNoAnnModels(), sheet1, table3);
//
//            writer.finish();
//        } catch (Exception e) {
//            e.printStackTrace();
//        } finally {
//            try {
//                out.close();
//            } catch (IOException e) {
//                e.printStackTrace();
//            }
//        }
//    }
//}
